package com.shanzmoo.platform.manage.api.web.product;


import com.shanzmoo.base.bean.PageRespBase;
import com.shanzmoo.base.bean.SHttpResponse;
import com.shanzmoo.db.module.product.domain.dto.ScoreModeSaveDto;
import com.shanzmoo.db.module.product.domain.dto.ScoreSaveDto;
import com.shanzmoo.db.module.product.domain.query.ScoreQueryVO;
import com.shanzmoo.db.module.product.domain.vo.ProductScoreVO;
import com.shanzmoo.db.module.product.domain.vo.ScoreModeVO;
import com.shanzmoo.platform.manage.api.manager.product.ProductScoreModeManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 商品分类manager
 * @author xueqz
 */
@Api(tags = "商品管理系统-积分商品类型")
@RestController
@RequestMapping("/api/product/scoreMode")
public class ProductScoreModeController {

    @Autowired
    private ProductScoreModeManager productScoreModeManager;


    @ApiOperation(value = "积分商品列表")
    @PostMapping("/getScoreModeList")
    public SHttpResponse<List<ScoreModeVO>> getScoreModeList() {

        return productScoreModeManager.getScoreModeList();
    }

    @ApiOperation(value = "添加积分商品类型")
    @PostMapping("/addScoreMode")
    public SHttpResponse<Integer> addScoreMode(@RequestBody ScoreModeSaveDto scoreModeSaveDto) {

        return productScoreModeManager.addScoreMode(scoreModeSaveDto);
    }



}
